<!doctype html>
<html>
  <head>
    <!-- MathJax -->
    <script type="text/javascript"
      src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
    </script>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <title>
      Caffe | Installation: RHEL / Fedora / CentOS
    </title>

    <link rel="icon" type="image/png" href="/images/caffeine-icon.png">

    <link rel="stylesheet" href="/stylesheets/reset.css">
    <link rel="stylesheet" href="/stylesheets/styles.css">
    <link rel="stylesheet" href="/stylesheets/pygment_trac.css">

    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
  </head>
  <body>
  <script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-46255508-1', 'daggerfs.com');
    ga('send', 'pageview');
  </script>
    <div class="wrapper">
      <header>
        <h1 class="header"><a href="/">Caffe</a></h1>
        <p class="header">
          Deep learning framework by <a class="header name" href="http://bair.berkeley.edu/">BAIR</a>
        </p>
        <p class="header">
          Created by
          <br>
          <a class="header name" href="http://daggerfs.com/">Yangqing Jia</a>
          <br>
          Lead Developer
          <br>
          <a class="header name" href="http://imaginarynumber.net/">Evan Shelhamer</a>
        <ul>
          <li>
            <a class="buttons github" href="https://github.com/BVLC/caffe">View On GitHub</a>
          </li>
        </ul>
      </header>
      <section>

      <h1 id="rhel--fedora--centos-installation">RHEL / Fedora / CentOS Installation</h1>

<p><strong>General dependencies</strong></p>

<div class="highlighter-rouge"><pre class="highlight"><code>sudo yum install protobuf-devel leveldb-devel snappy-devel opencv-devel boost-devel hdf5-devel
</code></pre>
</div>

<p><strong>Remaining dependencies, recent OS</strong></p>

<div class="highlighter-rouge"><pre class="highlight"><code>sudo yum install gflags-devel glog-devel lmdb-devel
</code></pre>
</div>

<p><strong>Remaining dependencies, if not found</strong></p>

<div class="highlighter-rouge"><pre class="highlight"><code># glog
wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/google-glog/glog-0.3.3.tar.gz
tar zxvf glog-0.3.3.tar.gz
cd glog-0.3.3
./configure
make &amp;&amp; make install
# gflags
wget https://github.com/schuhschuh/gflags/archive/master.zip
unzip master.zip
cd gflags-master
mkdir build &amp;&amp; cd build
export CXXFLAGS="-fPIC" &amp;&amp; cmake .. &amp;&amp; make VERBOSE=1
make &amp;&amp; make install
# lmdb
git clone https://github.com/LMDB/lmdb
cd lmdb/libraries/liblmdb
make &amp;&amp; make install
</code></pre>
</div>

<p>Note that glog does not compile with the most recent gflags version (2.1), so before that is resolved you will need to build with glog first.</p>

<p><strong>CUDA</strong>: Install via the NVIDIA package instead of <code class="highlighter-rouge">yum</code> to be certain of the library and driver versions.
Install the library and latest driver separately; the driver bundled with the library is usually out-of-date.
    + CentOS/RHEL/Fedora:</p>

<p><strong>BLAS</strong>: install ATLAS by <code class="highlighter-rouge">sudo yum install atlas-devel</code> or install OpenBLAS or MKL for better CPU performance. For the Makefile build, uncomment and set <code class="highlighter-rouge">BLAS_LIB</code> accordingly as ATLAS is usually installed under <code class="highlighter-rouge">/usr/lib[64]/atlas</code>).</p>

<p><strong>Python</strong> (optional): if you use the default Python you will need to <code class="highlighter-rouge">sudo yum install</code> the <code class="highlighter-rouge">python-devel</code> package to have the Python headers for building the pycaffe wrapper.</p>

<p>Continue with <a href="installation.html#compilation">compilation</a>.</p>


      </section>
  </div>
  </body>
</html>
